package com.wenson.behavior.responsibility;

/**
 * @ClassName: ResponeClient
 * @Author: luowangcheng
 * @Date: 2024/6/15 16:30
 * @Description:
 */
public class ResponseClient {
    public static void main(String[] args) {
        Approver flightJohn = new Staff("张飞");
        //配置责任链
        flightJohn.setNextApprover(new Manager("关羽")).setNextApprover(new CFO("刘备"));

        //直接找专员审批
        flightJohn.approve(1000);
        flightJohn.approve(4000);
        flightJohn.approve(9000);
        flightJohn.approve(88000);
    }
}
